mkl vml

您所在的位置:网站首页 vector math mkl vml

mkl vml

#mkl vml| 来源: 网络整理| 查看: 265

Introduction

This article discusses the Strided API - a new functionality introduced in the Intel® Math Kernel Library (Intel® MKL), version 2020 [1] for the Intel® MKL Vector Math (VM) component. This functionality allows you to use non-unit increments when traversing input and output arrays of a VM mathematical function. It is particularly useful in multi-dimensional arrays processing which is widely demanded in Python* popular NumPy package. The new Intel® MKL Vector Math API allows it to be done in just one pass in parallel mode.

Description

Originally the Vector Math component of Intel® Math Kernel Library was designed to support simple one-dimensional arrays processing by unit index increments. But in some cases, only selected elements of an input array with some fixed step need to be processed and written to an output array using some other fixed step. In this article, we show how the one-dimensional VM approach can be extended to the multi-dimensional case and support Python* NumPy notion of “strides”. NumPy strides are the number of bytes to jump-over in memory in order to get from one item to the next along each direction/dimension of the array. It is the separation between consecutive items for each dimension. With NumPy strides, Python* users can process multi-dimensional arrays with complex layouts in any direction – vertical, horizontal, etc., using arbitrary increments. The Vector Math component is being utilized in the NumPy package performance optimization. The lack of a strided interface for VM Mathematical Functions in previous Intel® Math Kernel Library releases can be emulated either by simple threaded loops before and after the VM call, for example: 

[1.1]

#pragma omp parallel for for(i=0;i


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3